home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / inetutil.1 / inetutil / inetutils-1.1 / headers / crypt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-01  |  1.6 KB  |  52 lines

  1. /* Interface to crypt that deals when it's missing
  2.  
  3.    Copyright (C) 1996 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef __CRYPT_H__
  20. #define __CRYPT_H__
  21.  
  22. #ifdef HAVE_WEAK_REFS
  23. extern char *crypt __P ((char *str, char salt[2])) __attribute__ ((weak));
  24. #else
  25. #ifdef HAVE_PRAGMA_WEAK_REFS
  26. extern char *crypt __P ((char *str, char salt[2]));
  27. #pragma weak crypt
  28. #else
  29. #ifdef HAVE_ASM_WEAK_REFS
  30. extern char *crypt __P ((char *str, char salt[2]));
  31. asm (".weak crypt");
  32. #else
  33. #ifdef HAVE_CRYPT
  34. extern char *crypt __P ((char *str, char salt[2]));
  35. #endif
  36. #endif
  37. #endif
  38. #endif
  39.  
  40. /* Call crypt, or just return STR if there is none.  */
  41. #if defined (HAVE_WEAK_REFS) || defined (HAVE_PRAGMA_WEAK_REFS) || defined (HAVE_ASM_WEAK_REFS)
  42. #define CRYPT(str, salt) (crypt ? crypt (str, salt) : (str))
  43. #else
  44. #ifdef HAVE_CRYPT
  45. #define CRYPT(str, salt) crypt (str, salt)
  46. #else
  47. #define CRYPT(str, salt) (str)
  48. #endif
  49. #endif
  50.  
  51. #endif /* __CRYPT_H__ */
  52.